<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Vod-kaKlient: Plik źródłowy player.hpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Wygenerowano przez Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="annotated.html"><span>Klasy</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>player.hpp</h1>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef PLAYER_HPP</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define PLAYER_HPP</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;boost/shared_ptr.hpp&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;boost/thread.hpp&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;video.hpp&quot;</span>
<a name="l00015"></a>00015 
<a name="l00016"></a><a class="code" href="classPlayer.html">00016</a> <span class="keyword">class </span><a class="code" href="classPlayer.html">Player</a>
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018 <span class="keyword">public</span>:
<a name="l00019"></a>00019     <a class="code" href="classPlayer.html#a9ff98b2e35dd460cb6ff88aca7d6fe13" title="Konstruktor podstawowy. Wymaga podania okna wxWidgets z ktorm bedzie wspolpracowal. Okno bedzie mialo ustawiane odpowiedni status (SetStatusText), a w przypadku odtwarzania - bedzie odswiezane (wydarzenie onPaint).">Player</a>(wxFrame* wind);
<a name="l00020"></a>00020 
<a name="l00021"></a>00021     <span class="keyword">typedef</span> <span class="keyword">enum</span> { STOP = 1, PLAY, PAUSE } State;
<a name="l00022"></a>00022 
<a name="l00023"></a>00023     <span class="keywordtype">void</span> <a class="code" href="classPlayer.html#a077488d7ae0fba42867cb0ece1c349bb" title="Funkcja laczy sie z podanym adresem RTSP.">open</a>(<span class="keywordtype">string</span> address);
<a name="l00024"></a>00024     <span class="keywordtype">void</span> <a class="code" href="classPlayer.html#a8cd819ec3812c26e038e74426bc2b90f" title="Funkcja uruchamia proces odtwarzania. W nowym watku uruchamiana jest petla odswiezajaca okno...">play</a>();
<a name="l00025"></a>00025     <span class="keywordtype">void</span> <a class="code" href="classPlayer.html#aa7749254cf909d029127d4622670c522" title="Zatrzymanie odtwarzanego nagrania.">pause</a>();
<a name="l00026"></a>00026     wxBitmap <a class="code" href="classPlayer.html#aed4712949eb7ae699a77a91a354f9683" title="Zwraca kolejna zdekodowana ramke wideo jako obiekt wxBitmap. Aby odtworzyc cale nagranie, nalezy wywolywac ta funkcje w metodzie obslugujacej wydarzenie onPaint okna wxWidgets.">getFrame</a>();
<a name="l00027"></a>00027     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classPlayer.html#a19455eaf5d3c267ff4261b5561f833ad" title="Zwraca szerokosc ramki odtwarzanego strumienia wideo.">getWidth</a>();
<a name="l00028"></a>00028     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classPlayer.html#ab3c9826598f403d6a3c20281d4f3c13e" title="Zwraca wysokosc ramki odtwarzanego strumienia wideo.">getHeight</a>();
<a name="l00029"></a>00029     <span class="keyword">volatile</span> State <a class="code" href="classPlayer.html#a9e2a7ba599527224a271dec6c4a600ec" title="Zwraca stan odtwarzacza.">getState</a>();
<a name="l00030"></a>00030 <span class="keyword">private</span>:
<a name="l00031"></a>00031     <span class="keywordtype">void</span> thread_function();
<a name="l00032"></a>00032     wxFrame *window;
<a name="l00033"></a>00033     boost::shared_ptr&lt;Video&gt; video;
<a name="l00034"></a>00034     boost::shared_ptr&lt;boost::thread&gt; thread;
<a name="l00035"></a>00035     State state;
<a name="l00036"></a>00036 };
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* PLAYER_HPP */</span>
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Klasy</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Funkcje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Wygenerowano Wed Jan 19 2011 15:22:07 dla Vod-kaKlient programem&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
